package TreeDayShuZu;

public class Dome02 {
    public static void main(String[] args) {
        int[] arr=new int[5];
        System.out.println("数组之前的长度为"+arr.length);
        System.out.println("数组赋值之前的值");
        for (int i = 0; i <arr.length ; i++) {
            if (i==0){
                System.out.print(arr[i]);
            }else{
                System.out.print(","+arr[i]);
            }
        }
        System.out.println("\n赋值之后的值");
        for (int i = 0; i < arr.length ; i++) {
            arr[i]=(i+1)*2;
        }
        for (int i = 0; i < arr.length ; i++) {
            if (i==0){
                System.out.print(arr[i]);
            }else {
                System.out.print(","+arr[i]);
            }
        }
    }
}
